home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / nullname.doc < prev    next >
Text File  |  1995-03-31  |  9KB  |  213 lines

  1. (Comp.sys.handhelds) 
  2. Item: 823 by n233dk at tamuts.tamu.edu 
  3. Author: [Rick Grevelle] 
  4.   Subj: More SYSEVALS 
  5.   Date: Sun Sep 30 1990 08:54  
  6.  
  7. There is perhaps a slight possiblity some confusion might develop over  
  8. this hidden object/directory business.  It seems that Eric Toonen was the 
  9. first to discover that the HOME directory contained a directory which is 
  10. normally hidden, and unavailable for use. 
  11.  
  12. This usually hidden directory is always present in the HOME directory, and 
  13. can not be deleted by a reset.  As a matter of fact, if your knowledge is 
  14. such that you're able to purge this directory, either a system halt, or a 
  15. reset, will actually reinstall it.  In other words, the hidden directory is 
  16. there by default.  And also by default, the directory has been named by HP, 
  17. using the NULL NAME '' (no spaces). 
  18.  
  19. This could constitute a potential problem in that either the user, or the  
  20. calculator could become confused by multiple NULL NAMES of the same length. 
  21.  
  22.  
  23. Generally, it is not a good idea to use names, local or global, which are  
  24. already being used by the calculator.  But, as everyone in this news group 
  25. is already aware, whatever can be used, can be abused. 
  26.  
  27. The actual SYSEVAL address for the NULL NAME is #15781h.  This returns the  
  28. NULL NAME without quotes so that it would be immediatly evaluated if the 
  29. current directory were the HOME.  There exist an RPL SYSEVAL that contains 
  30. a prefixed machine routine which allows the NULL NAME to be place on the  
  31. stack unevaluated.  Its address is #15777h. 
  32.  
  33. As Toonen has already pointed out, aside from the fact that it is hidden, 
  34. you CAN use this directory as if it were any other.  It is a true directory 
  35. just as the HOME directory.  If this seems a bit unbelievable, it can be 
  36. proven simply by using a prefixed machine routine from the ROM to recall 
  37. the entire contents of the HOME directory as a directory.  This also is 
  38. something you can't do without the use of SYSEVALs, or user written machine 
  39. code.   
  40.  
  41. While in the HOME directory, SYSEVAL this address: #8D5Ah.  Essentially 
  42. this routine recalls the contents of the current directory to the stack 
  43. just as if the name of the directory had been RCLed.  The only difference 
  44. is that the routine already knows what directory to recall, and, unlike 
  45. RCL, it works in HOME.  Once the HOME directory is on the stack you should 
  46. be able to see the hidden directory and the file names it contains.  This 
  47. is particularly evident in a 48 whose memory has been cleared.   
  48.  
  49. One final note, which has nothing to do with the above; for reasons 
  50. unknown, I was recently asked about a programmable OFF.  Perhaps someone 
  51. else also has a use for this as well.  It seems as if there should be 
  52. another way to do this; the only one of which I know is to use the SYSEVAL 
  53. for the [blue shift] [ON]  key, #3A9CE. 
  54.  
  55. Here is a quick summary of the four SYSEVALs covered above: 
  56.  
  57. #15781h      recalls the null name '' unquoted 
  58. #15777h      recalls the null name '' quoted 
  59. #08D5Ah      recalls the current directory 
  60. #3A9CEh      turns the 48 off 
  61.  
  62. Rick Grevelle 
  63.  
  64. ---------- 
  65.   Resp: 1 of 2 by jpser at cup.portal.com 
  66. Author: [John Paul Serafin] 
  67.   Date: Sun Sep 30 1990 14:54  
  68.  
  69. Why would a SYSEVAL to turn the HP48SX off be of interest?   The OFF 
  70. command is already programmable. 
  71.  
  72. A SYSEVAL to turn the HP28 off would be most welcome, however. 
  73. John Serafin 
  74. jpser@cup.portal.com 
  75.  
  76. ---------- 
  77.   Resp: 2 of 2 by sjthomas at cup.portal.com 
  78. Author: [Stephen J Thomas] 
  79.   Date: Mon Oct 01 1990 07:54  
  80.  
  81. Use #18E58 SYSEVAL to turn the HP 28S OFF.....when turned back on, 
  82. execution continues with the next step, if it was executed from a program. 
  83.    steve thomas 
  84.    
  85. sjthomas@cup.portal.com     sun!portal!cup.portal.com!sjthomas 
  86.  
  87.  
  88. (Comp.sys.handhelds)  
  89. Item: 826 by frechett at boulder.Colorado.EDU 
  90. Author: [-=Runaway Daemon=-] 
  91.   Subj: More hidden directory stuff 
  92.   Date: Mon Oct 01 1990 07:54  
  93.  
  94. Ok, the info from Rick is very interesting.  Thanks.  You had mentioned 
  95. that it could be used like any other directory and sure enough I can easily 
  96. enter and exit it via numerous methods now.  One little problem I have now 
  97. is that I would like to be able to put the "HIDE" routines in that 
  98. directory. 
  99. The hide routines need to be RCLd though, and I can't seem to find any way 
  100. to put '' in a list or string or anything.  What I need is a user-key 
  101. assignment that looks like this. 
  102. << {HOME '' HIDE } RCL EVAL >> 
  103. 11.1 
  104. etc.... but as you will find, there seems to be no way to get '' into the 
  105. list. It just disappears.  I have other stuff in my '' directory that I can 
  106. get to with key assignments but then I am there... Anyone know how I can 
  107. RCL an object from ''? 
  108.  
  109.      ian 
  110.  
  111. -- 
  112. -=Runaway Daemon=- 
  113.  
  114. ---------- 
  115.   Resp: 1 of 1 by n233dk at tamuts.tamu.edu 
  116. Author: [Rick Grevelle] 
  117.   Date: Mon Oct 01 1990 14:54  
  118.  
  119. >... I would like to be able to put the "HIDE" routines in that directory. 
  120. > The hide routines need to be RCLd though, and I can't seem to find any  
  121. > way to put '' in a list or string or anything.  What I need is a user 
  122. > key assingment that looks like this. 
  123. > << {HOME '' HIDE } RCL EVAL >> 
  124. > 11.1 
  125. > .... but as you will find, there seems to be no way to get '' into the 
  126. list.  It just disappears.  I have other stuff in my '' directory that I 
  127. can get to with key assignments but then I am there... Anyone know how I 
  128. can RCL an object from ''? 
  129. >    ian 
  130.  
  131.  
  132. It's not a problem.  There are probably more than a dozen ways to do what 
  133. you want to do.  The most straight foward approach is to use PUT in the OBJ 
  134. MENU. You already know how to get the NULL NAME on the stack using #15777h, 
  135. so the rest is easy.  Set up the stack arguments as shown below and execute 
  136. PUT to obtain the result. 
  137.  
  138.                       
  139.            Arguments                               Result 
  140.  
  141.       4:                                      4:    
  142.       3: { HOME A HIDE }                      3: 
  143.       2: 2                                    2: 
  144.       1: ''                                   1: { HOME HIDE } 
  145.  
  146.  
  147. Note that the NULL NAME does not appear in the list, but none the less it 
  148. is there.  You can check this several ways; the best would be to execute 
  149. OBJ->. This is a good example of just how deceptive NULL NAMES can be.  
  150. Personally I'd rather PEEK to see how the actual code is stored when 
  151. playing around in the 48.  You shouldn't trust the display routines to 
  152. always be truthful when fooling with such things as unallowed names and 
  153. unsupported objects.  
  154. Absolutely the easiest way to get the NULL NAME into the list is not to do 
  155. it at all.  All of the above effort was unnecessary because simply by 
  156. executing  PATH when in the NULL DIRECTORY the same list, without the HIDE, 
  157. is returned to the stack.  To put HIDE into the list, simply use the [+] 
  158. key with the list in level two, and the desired name to add is in level 
  159. one.  Remember, you will not see the NULL NAME in the list PATH returns, 
  160. but it will be there. 
  161.  
  162. The next step is to get the the result list into the program you described. 
  163. A minor sticking point is that you cannot EDIT the list.  If you felt that 
  164. the display routines were lacking in support, the EDIT routines are useless 
  165. when it comes to hacking as they provide no support for queer objects.  
  166.  
  167. EDIT the result list, and the NULL NAME will disappear for real this time.  
  168.  
  169. Verify this by DUPlicating the level one result and executing the 
  170. keystrokes [orange shift] [+/-] [ENTER].  Check it using OBJ-> again. 
  171.  
  172. A modified PUT that utilizes three SYSEVALs to get the result list into the 
  173. desired program is the solution.  Set up the stack arguments as shown 
  174. below; SYSEVAL these three addresses in order: #1D524h, #54AFh, #5445h; the 
  175. result will be as follows. 
  176.  
  177.  
  178.            Arguments                              Result 
  179.  
  180.       4:                                   4: 
  181.       3: << A RCL EVAL >>                  3:  
  182.       2: 2                                 2: 
  183.       1: { HOME HIDE }                     1: << { HOME HIDE } RCL EVAL  >> 
  184.  
  185.  
  186. Providing each of the above steps were performed correctly, the NULL NAME 
  187. should be in the list within the program.  By now it is probably obvious 
  188. that to hide directories and variables it is only necessary to first store 
  189. them in the NULL DIRECTORY, and make the necessary userkey assignments. 
  190.  
  191. Automating the above process requires a only the use of a relatively short 
  192. routine.  To use this program level one should contain the result returned 
  193. by the execution of PATH while in the desired directory, and any variable  
  194. from that directory you choose to add to it.  All that's left is to make 
  195. the necessary user key assignment.   
  196.  
  197. ->KEY  
  198. BYTES: #6704h 94 
  199.  
  200. \<< 
  201.    \<< A RCL EVAL 
  202.    \>> 2 ROT 
  203.  # 1D524h SYSEVAL 
  204.  # 54AFh SYSEVAL 
  205.  # 5445h SYSEVAL 
  206. \>> 
  207.  
  208. Note that this routine could be further shortened as well as the result it 
  209. returns. i.e. { HOME HIDE } RCL EVAL  (no program dilimiters) 
  210.  
  211. Rick Grevelle 
  212.